package com.disruptor.consumer.impl;


import com.disruptor.consumer.BaseConsumer;
import com.disruptor.entity.TranslatorDataWrapper;

/**
 * @author zl
 * @version 1.0
 * @date 2021/10/8 13:49
 */
public class DisruptorConsumer implements BaseConsumer<TranslatorDataWrapper> {

    @Override
    public void onEvent(TranslatorDataWrapper translatorDataWrapper, long l, boolean b) throws Exception {
        onEvent(translatorDataWrapper);
    }

    @Override
    public void onEvent(TranslatorDataWrapper translatorDataWrapper) throws Exception {
        System.out.println("DisruptorConsumer1===>"+translatorDataWrapper.getKey());
    }
}
